Optimal. Leaf size=409 \[ \frac {2 \left (20 a^3 b B-20 a b^3 B+30 a^2 b^2 (A-C)-b^4 (5 A+3 C)+a^4 (3 A+5 C)\right ) \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{5 d}+\frac {2 \left (a^4 B+18 a^2 b^2 B+b^4 B+4 a b^3 (3 A+C)+4 a^3 b (A+3 C)\right ) \sqrt {\cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{3 d}-\frac {2 b \left (10 a^3 B-60 a b^2 B+a^2 b (31 A-87 C)-3 b^3 (5 A+3 C)\right ) \sqrt {\sec (c+d x)} \sin (c+d x)}{15 d}-\frac {2 b^2 \left (5 a^2 B-5 b^2 B+14 a b (A-C)\right ) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{15 d}-\frac {2 b (11 A b+5 a B-3 b C) \sqrt {\sec (c+d x)} (a+b \sec (c+d x))^2 \sin (c+d x)}{15 d}+\frac {2 (8 A b+5 a B) (a+b \sec (c+d x))^3 \sin (c+d x)}{15 d \sqrt {\sec (c+d x)}}+\frac {2 A (a+b \sec (c+d x))^4 \sin (c+d x)}{5 d \sec ^{\frac {3}{2}}(c+d x)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.84, antiderivative size = 409, normalized size of antiderivative = 1.00, number of steps
used = 10, number of rules used = 8, integrand size = 43, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.186, Rules used = {4179, 4181,
4161, 4132, 3856, 2720, 4131, 2719} \begin {gather*} -\frac {2 b^2 \sin (c+d x) \sec ^{\frac {3}{2}}(c+d x) \left (5 a^2 B+14 a b (A-C)-5 b^2 B\right )}{15 d}-\frac {2 b \sin (c+d x) \sqrt {\sec (c+d x)} \left (10 a^3 B+a^2 b (31 A-87 C)-60 a b^2 B-3 b^3 (5 A+3 C)\right )}{15 d}+\frac {2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \left (a^4 B+4 a^3 b (A+3 C)+18 a^2 b^2 B+4 a b^3 (3 A+C)+b^4 B\right )}{3 d}+\frac {2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \left (a^4 (3 A+5 C)+20 a^3 b B+30 a^2 b^2 (A-C)-20 a b^3 B-b^4 (5 A+3 C)\right )}{5 d}-\frac {2 b \sin (c+d x) \sqrt {\sec (c+d x)} (5 a B+11 A b-3 b C) (a+b \sec (c+d x))^2}{15 d}+\frac {2 (5 a B+8 A b) \sin (c+d x) (a+b \sec (c+d x))^3}{15 d \sqrt {\sec (c+d x)}}+\frac {2 A \sin (c+d x) (a+b \sec (c+d x))^4}{5 d \sec ^{\frac {3}{2}}(c+d x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2719
Rule 2720
Rule 3856
Rule 4131
Rule 4132
Rule 4161
Rule 4179
Rule 4181
Rubi steps
\begin {align*} \int \frac {(a+b \sec (c+d x))^4 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{\sec ^{\frac {5}{2}}(c+d x)} \, dx &=\frac {2 A (a+b \sec (c+d x))^4 \sin (c+d x)}{5 d \sec ^{\frac {3}{2}}(c+d x)}+\frac {2}{5} \int \frac {(a+b \sec (c+d x))^3 \left (\frac {1}{2} (8 A b+5 a B)+\frac {1}{2} (3 a A+5 b B+5 a C) \sec (c+d x)-\frac {5}{2} b (A-C) \sec ^2(c+d x)\right )}{\sec ^{\frac {3}{2}}(c+d x)} \, dx\\ &=\frac {2 (8 A b+5 a B) (a+b \sec (c+d x))^3 \sin (c+d x)}{15 d \sqrt {\sec (c+d x)}}+\frac {2 A (a+b \sec (c+d x))^4 \sin (c+d x)}{5 d \sec ^{\frac {3}{2}}(c+d x)}+\frac {4}{15} \int \frac {(a+b \sec (c+d x))^2 \left (\frac {3}{4} \left (16 A b^2+15 a b B+a^2 (3 A+5 C)\right )+\frac {1}{4} \left (5 a^2 B+15 b^2 B+2 a b (A+15 C)\right ) \sec (c+d x)-\frac {5}{4} b (11 A b+5 a B-3 b C) \sec ^2(c+d x)\right )}{\sqrt {\sec (c+d x)}} \, dx\\ &=-\frac {2 b (11 A b+5 a B-3 b C) \sqrt {\sec (c+d x)} (a+b \sec (c+d x))^2 \sin (c+d x)}{15 d}+\frac {2 (8 A b+5 a B) (a+b \sec (c+d x))^3 \sin (c+d x)}{15 d \sqrt {\sec (c+d x)}}+\frac {2 A (a+b \sec (c+d x))^4 \sin (c+d x)}{5 d \sec ^{\frac {3}{2}}(c+d x)}+\frac {8}{75} \int \frac {(a+b \sec (c+d x)) \left (\frac {5}{8} a \left (50 a b B+b^2 (59 A-3 C)+3 a^2 (3 A+5 C)\right )+\frac {5}{8} \left (5 a^3 B+45 a b^2 B+3 b^3 (5 A+3 C)+a^2 b (11 A+45 C)\right ) \sec (c+d x)-\frac {15}{8} b \left (5 a^2 B-5 b^2 B+14 a b (A-C)\right ) \sec ^2(c+d x)\right )}{\sqrt {\sec (c+d x)}} \, dx\\ &=-\frac {2 b^2 \left (5 a^2 B-5 b^2 B+14 a b (A-C)\right ) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{15 d}-\frac {2 b (11 A b+5 a B-3 b C) \sqrt {\sec (c+d x)} (a+b \sec (c+d x))^2 \sin (c+d x)}{15 d}+\frac {2 (8 A b+5 a B) (a+b \sec (c+d x))^3 \sin (c+d x)}{15 d \sqrt {\sec (c+d x)}}+\frac {2 A (a+b \sec (c+d x))^4 \sin (c+d x)}{5 d \sec ^{\frac {3}{2}}(c+d x)}+\frac {16}{225} \int \frac {\frac {15}{16} a^2 \left (50 a b B+b^2 (59 A-3 C)+3 a^2 (3 A+5 C)\right )+\frac {75}{16} \left (a^4 B+18 a^2 b^2 B+b^4 B+4 a b^3 (3 A+C)+4 a^3 b (A+3 C)\right ) \sec (c+d x)-\frac {15}{16} b \left (10 a^3 B-60 a b^2 B-3 b^3 (5 A+3 C)+a^2 (31 A b-87 b C)\right ) \sec ^2(c+d x)}{\sqrt {\sec (c+d x)}} \, dx\\ &=-\frac {2 b^2 \left (5 a^2 B-5 b^2 B+14 a b (A-C)\right ) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{15 d}-\frac {2 b (11 A b+5 a B-3 b C) \sqrt {\sec (c+d x)} (a+b \sec (c+d x))^2 \sin (c+d x)}{15 d}+\frac {2 (8 A b+5 a B) (a+b \sec (c+d x))^3 \sin (c+d x)}{15 d \sqrt {\sec (c+d x)}}+\frac {2 A (a+b \sec (c+d x))^4 \sin (c+d x)}{5 d \sec ^{\frac {3}{2}}(c+d x)}+\frac {16}{225} \int \frac {\frac {15}{16} a^2 \left (50 a b B+b^2 (59 A-3 C)+3 a^2 (3 A+5 C)\right )-\frac {15}{16} b \left (10 a^3 B-60 a b^2 B-3 b^3 (5 A+3 C)+a^2 (31 A b-87 b C)\right ) \sec ^2(c+d x)}{\sqrt {\sec (c+d x)}} \, dx+\frac {1}{3} \left (a^4 B+18 a^2 b^2 B+b^4 B+4 a b^3 (3 A+C)+4 a^3 b (A+3 C)\right ) \int \sqrt {\sec (c+d x)} \, dx\\ &=-\frac {2 b \left (10 a^3 B-60 a b^2 B+a^2 b (31 A-87 C)-3 b^3 (5 A+3 C)\right ) \sqrt {\sec (c+d x)} \sin (c+d x)}{15 d}-\frac {2 b^2 \left (5 a^2 B-5 b^2 B+14 a b (A-C)\right ) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{15 d}-\frac {2 b (11 A b+5 a B-3 b C) \sqrt {\sec (c+d x)} (a+b \sec (c+d x))^2 \sin (c+d x)}{15 d}+\frac {2 (8 A b+5 a B) (a+b \sec (c+d x))^3 \sin (c+d x)}{15 d \sqrt {\sec (c+d x)}}+\frac {2 A (a+b \sec (c+d x))^4 \sin (c+d x)}{5 d \sec ^{\frac {3}{2}}(c+d x)}+\frac {1}{5} \left (20 a^3 b B-20 a b^3 B+30 a^2 b^2 (A-C)-b^4 (5 A+3 C)+a^4 (3 A+5 C)\right ) \int \frac {1}{\sqrt {\sec (c+d x)}} \, dx+\frac {1}{3} \left (\left (a^4 B+18 a^2 b^2 B+b^4 B+4 a b^3 (3 A+C)+4 a^3 b (A+3 C)\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx\\ &=\frac {2 \left (a^4 B+18 a^2 b^2 B+b^4 B+4 a b^3 (3 A+C)+4 a^3 b (A+3 C)\right ) \sqrt {\cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{3 d}-\frac {2 b \left (10 a^3 B-60 a b^2 B+a^2 b (31 A-87 C)-3 b^3 (5 A+3 C)\right ) \sqrt {\sec (c+d x)} \sin (c+d x)}{15 d}-\frac {2 b^2 \left (5 a^2 B-5 b^2 B+14 a b (A-C)\right ) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{15 d}-\frac {2 b (11 A b+5 a B-3 b C) \sqrt {\sec (c+d x)} (a+b \sec (c+d x))^2 \sin (c+d x)}{15 d}+\frac {2 (8 A b+5 a B) (a+b \sec (c+d x))^3 \sin (c+d x)}{15 d \sqrt {\sec (c+d x)}}+\frac {2 A (a+b \sec (c+d x))^4 \sin (c+d x)}{5 d \sec ^{\frac {3}{2}}(c+d x)}+\frac {1}{5} \left (\left (20 a^3 b B-20 a b^3 B+30 a^2 b^2 (A-C)-b^4 (5 A+3 C)+a^4 (3 A+5 C)\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \sqrt {\cos (c+d x)} \, dx\\ &=\frac {2 \left (20 a^3 b B-20 a b^3 B+30 a^2 b^2 (A-C)-b^4 (5 A+3 C)+a^4 (3 A+5 C)\right ) \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{5 d}+\frac {2 \left (a^4 B+18 a^2 b^2 B+b^4 B+4 a b^3 (3 A+C)+4 a^3 b (A+3 C)\right ) \sqrt {\cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{3 d}-\frac {2 b \left (10 a^3 B-60 a b^2 B+a^2 b (31 A-87 C)-3 b^3 (5 A+3 C)\right ) \sqrt {\sec (c+d x)} \sin (c+d x)}{15 d}-\frac {2 b^2 \left (5 a^2 B-5 b^2 B+14 a b (A-C)\right ) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{15 d}-\frac {2 b (11 A b+5 a B-3 b C) \sqrt {\sec (c+d x)} (a+b \sec (c+d x))^2 \sin (c+d x)}{15 d}+\frac {2 (8 A b+5 a B) (a+b \sec (c+d x))^3 \sin (c+d x)}{15 d \sqrt {\sec (c+d x)}}+\frac {2 A (a+b \sec (c+d x))^4 \sin (c+d x)}{5 d \sec ^{\frac {3}{2}}(c+d x)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 7.46, size = 485, normalized size = 1.19 \begin {gather*} \frac {2 \cos ^6(c+d x) \left (\frac {2 \left (9 a^4 A+90 a^2 A b^2-15 A b^4+60 a^3 b B-60 a b^3 B+15 a^4 C-90 a^2 b^2 C-9 b^4 C\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}}+2 \left (20 a^3 A b+60 a A b^3+5 a^4 B+90 a^2 b^2 B+5 b^4 B+60 a^3 b C+20 a b^3 C\right ) \sqrt {\cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}\right ) (a+b \sec (c+d x))^4 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{15 d (b+a \cos (c+d x))^4 (A+2 C+2 B \cos (c+d x)+A \cos (2 c+2 d x))}+\frac {(a+b \sec (c+d x))^4 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \left (\frac {1}{5} \left (a^4 A+20 A b^4+80 a b^3 B+120 a^2 b^2 C+12 b^4 C\right ) \sin (c+d x)+\frac {4}{3} \sec (c+d x) \left (b^4 B \sin (c+d x)+4 a b^3 C \sin (c+d x)\right )+\frac {2}{3} a^3 (4 A b+a B) \sin (2 (c+d x))+\frac {1}{5} a^4 A \sin (3 (c+d x))+\frac {4}{5} b^4 C \sec (c+d x) \tan (c+d x)\right )}{d (b+a \cos (c+d x))^4 (A+2 C+2 B \cos (c+d x)+A \cos (2 c+2 d x)) \sec ^{\frac {11}{2}}(c+d x)} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(1856\) vs.
\(2(429)=858\).
time = 0.30, size = 1857, normalized size = 4.54
method | result | size |
default | \(\text {Expression too large to display}\) | \(1857\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.91, size = 455, normalized size = 1.11 \begin {gather*} -\frac {5 \, \sqrt {2} {\left (i \, B a^{4} + 4 i \, {\left (A + 3 \, C\right )} a^{3} b + 18 i \, B a^{2} b^{2} + 4 i \, {\left (3 \, A + C\right )} a b^{3} + i \, B b^{4}\right )} \cos \left (d x + c\right )^{2} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) + 5 \, \sqrt {2} {\left (-i \, B a^{4} - 4 i \, {\left (A + 3 \, C\right )} a^{3} b - 18 i \, B a^{2} b^{2} - 4 i \, {\left (3 \, A + C\right )} a b^{3} - i \, B b^{4}\right )} \cos \left (d x + c\right )^{2} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) + 3 \, \sqrt {2} {\left (-i \, {\left (3 \, A + 5 \, C\right )} a^{4} - 20 i \, B a^{3} b - 30 i \, {\left (A - C\right )} a^{2} b^{2} + 20 i \, B a b^{3} + i \, {\left (5 \, A + 3 \, C\right )} b^{4}\right )} \cos \left (d x + c\right )^{2} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) + 3 \, \sqrt {2} {\left (i \, {\left (3 \, A + 5 \, C\right )} a^{4} + 20 i \, B a^{3} b + 30 i \, {\left (A - C\right )} a^{2} b^{2} - 20 i \, B a b^{3} - i \, {\left (5 \, A + 3 \, C\right )} b^{4}\right )} \cos \left (d x + c\right )^{2} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right ) - \frac {2 \, {\left (3 \, A a^{4} \cos \left (d x + c\right )^{4} + 3 \, C b^{4} + 5 \, {\left (B a^{4} + 4 \, A a^{3} b\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left (30 \, C a^{2} b^{2} + 20 \, B a b^{3} + {\left (5 \, A + 3 \, C\right )} b^{4}\right )} \cos \left (d x + c\right )^{2} + 5 \, {\left (4 \, C a b^{3} + B b^{4}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}}}{15 \, d \cos \left (d x + c\right )^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\left (a+\frac {b}{\cos \left (c+d\,x\right )}\right )}^4\,\left (A+\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right )}{{\left (\frac {1}{\cos \left (c+d\,x\right )}\right )}^{5/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________